<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="优质女装...">
    <meta name="keywords" content="女装，服饰...">
    <title>CASEY女装官网——重新演绎精湛工艺与优雅皮革</title>

    <style>
        @font-face {
            font-family: 'icomoon';
            src: url('fonts/icomoon.eot?hr7bri');
            src: url('fonts/icomoon.eot?hr7bri#iefix') format('embedded-opentype'),
                url('fonts/icomoon.ttf?hr7bri') format('truetype'),
                url('fonts/icomoon.woff?hr7bri') format('woff'),
                url('fonts/icomoon.svg?hr7bri#icomoon') format('svg');
            font-weight: normal;
            font-style: normal;
            font-display: block;
        }

    </style>
</head>

<link rel="shortcut icon" href="../Imgs/logo.ico" type="image/x-icon">
<link rel="stylesheet" href="../CSS/initialization.css">
<link rel="stylesheet" href="../CSS/homePageStyle.css">

<body>
<!-- 	获取登录用户用户名 -->
	<%
		request.setCharacterEncoding("UTF-8");
		String username=String.valueOf(session.getAttribute("username"));
	%>

	
    <!-- 导航栏 -->
    <div class="background">
        <div class="nav">
            <div class="kindsBox" style="width:400px;">
                <ul>
                    <li><a href="clothePage.jsp">服装系列</a></li>
                    <li><a href="bagPage.jsp">手袋</a></li>
                    <li><a href="otherPage.jsp">配饰</a></li>
                </ul>
            </div>
            <div class="title">CASEY</div>
            <div class="guideBox"  style="width:400px;">
                <ul>
                    <li><%if(username!=null && username!="null"){out.println("<a href='#' style='color:rgb(150,0,0);font-size:15px;'><span class='icomoon' style='line-height:100%;'></span> &nbsp;"+username+"</a><a href='index.jsp' style='color:rgb(150,0,0);margin-left:20px;'><span class='icomoon'></span></a>");}else{out.println("<a href='index.jsp'><span class='icomoon' style='line-height:100%;''></span> 登录/注册</a>");}%></li>
                    <li><a href="likePage.jsp">我的收藏</a></li>
                    <li><a href="#">购物袋</a></li>
                </ul>
            </div>
        </div>

    </div>

    <!-- 下滑指示 -->
    <div class="moveSignBox">
        <div class="content">
            <span class="icomoon" style="font-size:40px;"></span>
        </div>
    </div>

    <!-- 滑动视差展示产品 -->
    <div class="section2">
        <div id="homePageImgContainer1" class="homePageImgContainer homePageImgContainer1">
            <div class="section2-container1 section2-container" style="animation-delay:1000ms;margin-top:10px;">
                <div class="section2-content section2-content1"></div>
                <div class="section2-content section2-content2"></div>
                <div class="section2-content section2-content3"></div>
                <div class="section2-content section2-content4"></div>
            </div>
            <div class="section2-container2 section2-container" style="animation-delay:1200ms;">
                <div style="background-position:0 23%" ; class="section2-content section2-content1"></div>
                <div style="background-position:0 23%" ; class="section2-content section2-content2"></div>
                <div style="background-position:0 23%" ; class="section2-content section2-content3"></div>
                <div style="background-position:0 23%" ; class="section2-content section2-content4"></div>
            </div>
            <div class="section2-container3 section2-container" style="animation-delay:1400ms;">
                <div style="background-position:0 47%" ; class="section2-content section2-content1"></div>
                <div style="background-position:0 47%" ; class="section2-content section2-content2"></div>
                <div style="background-position:0 47%" ; class="section2-content section2-content3"></div>
                <div style="background-position:0 47%" ; class="section2-content section2-content4"></div>
            </div>
            <div class="section2-container4 section2-container" style="animation-delay:1600ms;">
                <div style="background-position:0 69%" ; class="section2-content section2-content1"></div>
                <div style="background-position:0 69%" ; class="section2-content section2-content2"></div>
                <div style="background-position:0 69%" ; class="section2-content section2-content3"></div>
                <div style="background-position:0 69%" ; class="section2-content section2-content4"></div>
            </div>
            <div class="section2-container5 section2-container" style="animation-delay:1800ms;">
                <div style="background-position:0 96%" ; class="section2-content section2-content1"></div>
                <div style="background-position:0 96%" ; class="section2-content section2-content2"></div>
                <div style="background-position:0 96%" ; class="section2-content section2-content3"></div>
                <div style="background-position:0 96%" ; class="section2-content section2-content4"></div>
            </div>
        </div>



        <div id="homePageImgContainer2" class="homePageImgContainer homePageImgContainer2">
            <div id="imgContainer" class="imgContainer">
                <div class="img img1" style="background-image: url('../productsImgs/BAG/bag11.jpg');"></div>
                <div class="img img2" style="background-image: url('../productsImgs/BAG/bag21.jpg');"></div>
                <div class="img img3" style="background-image: url('../productsImgs/BAG/bag31.jpg');"></div>
                <div class="img img4" style="background-image: url('../productsImgs/BAG/bag41.jpg');"></div>
                <div class="img img5" style="background-image: url('../productsImgs/BAG/bag51.jpg');"></div>
            </div>
            <div class="ulContainer">
                <ul>
                    <li onClick="changeImgIndex(1)" id="li1" class="li li1"
                        style="border-bottom-color:red;border-bottom-width: 10px;"></li>
                    <li onClick="changeImgIndex(2)" id="li2" class="li li2"></li>
                    <li onClick="changeImgIndex(3)" id="li3" class="li li3"></li>
                    <li onClick="changeImgIndex(4)" id="li4" class="li li4"></li>
                    <li onClick="changeImgIndex(5)" id="li5" class="li li5" style="margin-right:0px;"></li>
                </ul>
            </div>
            <span style="margin-bottom:10px;margin-top:30px;font-size:25px;">全新系列</span>
            <span>Puzzle手袋与Bracelet手拿包经过焕新演绎，以引人瞩目的单色调呈现，搭配哑光配件。</span>
            <span style="margin-top:15px;"><a href="bagPage.jsp">查看更多</a></span>
        </div>

    </div>

    <div class="clotheContainer">
        <span style="margin-top:400px;font-size:40px;margin-bottom:15px;">精品服饰</span>
        <span>女士成衣，季度定制倾情呈现</span>
        <a href="clothePage.jsp">探索更多</a>
    </div>

    <div class="jewelryContainer">
        <div id="content1" class="content content1" style="margin-right:30px;">
            <div id="content1P1" class="content1P conten1P1" onmouseenter="showDetails(1)">
                <img src="../productsImgs/OTHER/j11.jpg" alt="">
                <span id="content1PSpan1">经典牛皮革气球小包<br>￥ 4100</span>
            </div>
            <div id="content1P2" class="content1P conten1P2" onmouseenter="showDetails(2)">
                <img src="../productsImgs/OTHER/j21.jpg" alt="">
                <span id="content1PSpan2">小号挂坠银质项链<br>￥ 8900</span>
            </div>
            <div id="content1P3" class="content1P conten1P3" onmouseenter="showDetails(3)">
                <img src="../productsImgs/OTHER/j31.jpg" alt="">
                <span id="content1PSpan3">棉质和牛皮革钩针编织帽<br>￥ 4200</span>
            </div>
            <div id="content1P4" class="content1P conten1P4" onmouseenter="showDetails(4)">
                <img src="../productsImgs/OTHER/j41.jpg" alt="">
                <span id="content1PSpan4">银质甜甜圈手链<br>￥ 18900</span>
            </div>
            <div id="content1P5" class="content1P conten1P5" onmouseenter="showDetails(5)">
                <img src="../productsImgs/OTHER/j51.jpg" alt="">
                <span id="content1PSpan5">缎面牛皮革带子<br>￥ 3700</span>
            </div>
            <div id="content1P6" class="content1P conten1P6" onmouseenter="showDetails(6)">
                <img src="../productsImgs/OTHER/j61.jpg" alt="">
                <span id="content1PSpan6">牛皮革和黄铜化石挂饰<br>￥ 3100</span>
            </div>
        </div>
        <div class="checkForMore"><button onclick="window.location.href='otherPage.jsp'">获取更多</button></div>
    </div>
    <div id="footer" class="footer">
        <ul>
            <li class="dt">专属服务</li>
            <li class="dd">免费标准配送</li>
            <li class="dd">免费礼品包装</li>
            <li class="dd" style="margin-bottom:50px;">预约门店服务</li>
            <li class="dt">需要帮助？</li>
            <li class="dd">联系我们</li>
            <li class="dd">常见问题</li>
        </ul>
        <ul>
            <li class="dt">购物帮助</li>
            <li class="dd">支付相关</li>
            <li class="dd">配送</li>
            <li class="dd">退换货</li>
            <li class="dd">发票</li>
            <li class="dd">保养与维修</li>
        </ul>
        <ul>
            <li class="dt">关于公司</li>
            <li class="dd">关于CASEY</li>
            <li class="dd">道德规范</li>
            <li class="dd">职业发展</li>
            <li class="dd">细则与条款</li>
            <li class="dd">隐私与COOKIE</li>
            <li class="dd">企业信息</li>
        </ul>
        <ul>
            <li class="dt">关注CASEY</li>
            <li class="dd">微信</li>
            <li class="dd">抖音</li>
            <li class="dd">腾讯视频</li>
            <li class="dd" style="margin-bottom:50px;">小红书</li>
            <li class="dt">在线顾问</li>
            <li class="dd"><span class="icomoon"></span>17816752712</li>
        </ul>
        <ul>
            <li class="dt">订阅CASEY电子资讯</li>
            <li class="dd">通过订阅，即代表您接受CASEY<em style="color:blue;text-decoration:underline;">隐私政策条款</em></li>
            <li class="dd" style="margin-bottom:50px;position:relative;"><input type="text" placeholder="电子邮件地址 " style="width:200px;"><span class="icomoon" style="position:absolute;right:80px;line-height:30px;"></span>
            </li>
            <li class="dt">直营店查询</li>
            <li class="dd" style="position:relative;">
	            <input type="text" placeholder="请选择省" style="margin-right:30px;"><span class="icomoon" style="position:absolute;left:100px;line-height:30px;"></span>
	            <input type="text" placeholder="请选择市"><span class="icomoon" style="position:absolute;right:10px;line-height:30px;"></span>
            </li>
        </ul>
    </div>

</body>

<script>
    var title = document.querySelector(".title");
    var nav = document.querySelector(".nav");
    var homePageImgContainer1 = document.querySelector(".homePageImgContainer1");
    var homePageImgContainer2 = document.querySelector(".homePageImgContainer2");
    var section2Container = document.querySelector(".section2-container");

    // 随着滚轮下滑，标题变小
    window.addEventListener('scroll', scroll);
    function scroll() {
        const scrollY = window.scrollY;
        if (scrollY > 0) {
            nav.style.marginTop = "100px";
            if (200 - scrollY / 1.5 > 100) {
                title.style.fontSize = 200 - scrollY / 1.5 + "px";
                nav.style.transform = "translateY(-" + scrollY / 2 + "px)";
            } else {
                nav.style.transform = "";
            }
            if (scrollY > 300) {
                nav.style.marginTop = "0px";
                window.onmousewheel = temp;
            } else {
                nav.style.marginTop = "100px";
                nav.classList.remove("navSpecial");
                title.classList.remove("titleSpecial");
            }
        } else {
            nav.classList.remove("navSpecial");
            title.classList.remove("titleSpecial");
            nav.classList.add("navSpecialHide");
        }
    }

    // 鼠标滚轮上滑（下滑）显示（隐藏）导航栏
    function temp(e) {
        if (e.wheelDelta) {
            if (window.scrollY > 300) {
                if (e.wheelDelta > 0) {
                    nav.classList.add("navSpecial");
                    title.classList.add("titleSpecial");
                } else {
                    nav.style.marginTop = "100px";
                    nav.classList.remove("navSpecial");
                    title.classList.remove("titleSpecial");
                }
            }
        }
    }

    // 视差展示最新产品、推销产品等
    window.addEventListener('scroll', showhomePageContainer1);
    function showhomePageContainer1() {
        const scrollY = window.scrollY;
        if (scrollY < 100) {
            homePageImgContainer1.classList.remove("homePageImgContainer1Show");
            homePageImgContainer2.classList.remove("homePageImgContainer2Show");
        } else if (scrollY < 200) {
            homePageImgContainer1.classList.add("homePageImgContainer1Show");
            homePageImgContainer2.classList.add("homePageImgContainer2Show");
        }
    }

    // 滚动展示图片，点击对应的li跳转至指定的位置
    var imgIndex = 1;
    var imgPosition = 0;
    var changeImg = setInterval(() => {
        if (imgIndex < 6) {
            for (var i = 1; i < 6; i++) {
                if (i == imgIndex) {
                    document.getElementById("li" + i).style.borderBottomColor = "red";
                    document.getElementById("li" + i).style.borderBottomWidth = "10px";
                } else {
                    document.getElementById("li" + i).style.borderBottomColor = "aquamarine";
                    document.getElementById("li" + i).style.borderBottomWidth = "6px";
                }
            }
            document.getElementById("imgContainer").style.transform = "translateX(-" + imgPosition + "px)";
            imgPosition += 445;
            imgIndex++;
        } else {
            imgIndex = 1;
            imgPosition = 0;
        }
    }, 2000);
    function changeImgIndex(num) {
        imgIndex = num;
        imgPosition = (num - 1) * 445;
    }

    // 配饰展示区域鼠标进入显示价格等信息
    var content1P = document.querySelector(".content1P");

    content1P.addEventListener("mouseenter", showDetails(num));
    function showDetails(num) {
        for (var i = 1; i < 7; i++) {
            if (i == num) {
                document.getElementById("content1PSpan" + i).style.opacity = "1";
                document.getElementById("content1PSpan" + i).style.backgroundColor = "rgb(130, 255, 213,.1)";
                document.getElementById("content1PSpan" + i).style.transform = "translateY(40px)";
            } else {
                document.getElementById("content1PSpan" + i).style.opacity = "0";
                document.getElementById("content1PSpan" + i).style.backgroundColor = "white";
                document.getElementById("content1PSpan" + i).style.transform = "translateY()";
            }
        }
    }

</script>

</html>